package net.fltx.assets.service;

import net.fltx.assets.dao.AccessLogMapper;
import net.fltx.assets.entity.AccessLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class AccessLogServiceImpl implements AccessLogService {

    @Autowired
    private AccessLogMapper accessLogMapper;

    @Override
    public int insert(AccessLog record) {
        record.setCreateTime(new Date());
        return accessLogMapper.insert(record);
    }

    @Override
    public List<AccessLog> selectByAll() {
        return accessLogMapper.selectByAll();
    }
}
